.TH std::chrono::month_day_last::ok 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::chrono::month_day_last::ok \- std::chrono::month_day_last::ok

.SH Synopsis
   constexpr bool ok() const noexcept;  \fI(since C++20)\fP

   Checks if the month object stored in *this is valid.

.SH Return value

   month().ok()

.SH Example


// Run this code

 #include <cassert>
 #include <chrono>

 int main()
 {
     auto mdl{std::chrono::February/std::chrono::last};
     assert(mdl.ok());
     mdl = {std::chrono::month(42)/std::chrono::last};
     assert(!mdl.ok());
 }
